<html>
<head>
    <title>shellDemo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body >
<h1>shell 测试</h1>
<button onclick="openInexplorer()">在默认浏览器中打开玄魂的电子书</button>
<button onclick="openPdf()">打开pdf</button>
<button onclick="showPdfInFloder()">打开pdf所在的文件夹</button>
<script>
    // Load native UI library.
    var gui = require('nw.gui');
    var shell = gui.Shell;
    function openInexplorer()
    {
        shell.openExternal('http://www.baidu.com');
    }
    function openPdf()
    {
        shell.openItem('D:\\Program Files\\PremiumSoft\\Navicat Premium\\navicat.pdf');
    }
    function showPdfInFloder()
    {
        shell.showItemInFolder('D:\\Program Files\\PremiumSoft\\Navicat Premium\\navicat.pdf');
    }
</script>
</body>
</html>